package com.zenithmind.classroom.pojo.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 学习分析VO
 * 
 * @author ZenithMind Team
 * @since 2025-01-09
 */
@Data
@Schema(description = "学习分析VO")
public class LearningAnalysisVO {

    /**
     * 用户ID
     */
    @Schema(description = "用户ID", example = "1234567890")
    private String userId;

    /**
     * 用户名称
     */
    @Schema(description = "用户名称", example = "张三")
    private String userName;

    /**
     * 课程ID
     */
    @Schema(description = "课程ID", example = "1234567890")
    private String courseId;

    /**
     * 课程标题
     */
    @Schema(description = "课程标题", example = "Java从入门到精通")
    private String courseTitle;

    /**
     * 总学习时长（分钟）
     */
    @Schema(description = "总学习时长（分钟）", example = "1200")
    private Integer totalStudyTime;

    /**
     * 总学习天数
     */
    @Schema(description = "总学习天数", example = "30")
    private Integer totalStudyDays;

    /**
     * 平均每日学习时长（分钟）
     */
    @Schema(description = "平均每日学习时长（分钟）", example = "40")
    private Double avgDailyStudyTime;

    /**
     * 学习进度百分比
     */
    @Schema(description = "学习进度百分比", example = "75")
    private Integer progressPercent;

    /**
     * 已完成章节数
     */
    @Schema(description = "已完成章节数", example = "8")
    private Integer completedChapters;

    /**
     * 总章节数
     */
    @Schema(description = "总章节数", example = "10")
    private Integer totalChapters;

    /**
     * 已完成课时数
     */
    @Schema(description = "已完成课时数", example = "40")
    private Integer completedLessons;

    /**
     * 总课时数
     */
    @Schema(description = "总课时数", example = "50")
    private Integer totalLessons;

    /**
     * 学习效率评分（1-5分）
     */
    @Schema(description = "学习效率评分（1-5分）", example = "4")
    private Integer efficiencyScore;

    /**
     * 学习质量评分（1-5分）
     */
    @Schema(description = "学习质量评分（1-5分）", example = "4")
    private Integer qualityScore;

    /**
     * 学习活跃度评分（1-5分）
     */
    @Schema(description = "学习活跃度评分（1-5分）", example = "5")
    private Integer activityScore;

    /**
     * 连续学习天数
     */
    @Schema(description = "连续学习天数", example = "7")
    private Integer consecutiveDays;

    /**
     * 最长连续学习天数
     */
    @Schema(description = "最长连续学习天数", example = "15")
    private Integer maxConsecutiveDays;

    /**
     * 学习笔记数量
     */
    @Schema(description = "学习笔记数量", example = "25")
    private Integer noteCount;

    /**
     * 提问数量
     */
    @Schema(description = "提问数量", example = "10")
    private Integer questionCount;

    /**
     * 收藏数量
     */
    @Schema(description = "收藏数量", example = "15")
    private Integer favoriteCount;

    /**
     * 最常学习时段
     */
    @Schema(description = "最常学习时段", example = "晚上")
    private String preferredTimeSlot;

    /**
     * 最常使用设备
     */
    @Schema(description = "最常使用设备", example = "PC")
    private String preferredDevice;

    /**
     * 学习习惯分析
     */
    @Schema(description = "学习习惯分析")
    private String habitAnalysis;

    /**
     * 学习建议
     */
    @Schema(description = "学习建议")
    private String recommendations;

    /**
     * 薄弱知识点
     */
    @Schema(description = "薄弱知识点")
    private String weakPoints;

    /**
     * 优势知识点
     */
    @Schema(description = "优势知识点")
    private String strongPoints;

    /**
     * 学习趋势
     */
    @Schema(description = "学习趋势", example = "上升")
    private String learningTrend;

    /**
     * 预计完成时间
     */
    @Schema(description = "预计完成时间")
    private LocalDateTime estimatedCompletionTime;

    /**
     * 开始学习时间
     */
    @Schema(description = "开始学习时间")
    private LocalDateTime startTime;

    /**
     * 最后学习时间
     */
    @Schema(description = "最后学习时间")
    private LocalDateTime lastStudyTime;

    /**
     * 分析生成时间
     */
    @Schema(description = "分析生成时间")
    private LocalDateTime analysisTime;

    /**
     * 热力图数据内部类
     */
    @Data
    @Schema(description = "热力图数据")
    public static class HeatmapData {

        /**
         * 日期
         */
        @Schema(description = "日期", example = "2024-01-01")
        private String date;

        /**
         * 学习时长（分钟）
         */
        @Schema(description = "学习时长（分钟）", example = "60")
        private Integer studyMinutes;

        /**
         * 学习强度（1-5级）
         */
        @Schema(description = "学习强度（1-5级）", example = "3")
        private Integer intensity;

        /**
         * 学习次数
         */
        @Schema(description = "学习次数", example = "2")
        private Integer studyCount;
    }
}
